<?php
/**
 * Created by PhpStorm.
 * User: lhl
 * Date: 2019/9/4
 * Time: 15:13
 * Features: api接口通用方法
 */

namespace app\common\service;


use think\facade\Config;
use think\facade\Request;

class ApiHelper
{
    /**
     * 查询状态码
     * @param string $name 不填,则返回数组
    */
    public static function getCode($name = ''){
        if(!$name){
            return Config::get('exception.api_status_code');
        }else{
            return Config::get('exception.api_status_code.'.$name);
        }
    }

}